package cn.cvs.mysingle;

/**
 * 优化后的单例模式
 */
public class User3 {

    private static User3 user=null;

    private User3() {
    }

    private static class UserHelper{
         private static final User3 myuser = new User3();
    }

    public static User3 getInstance(){
        user =UserHelper.myuser;
        return user;
    }

}
